package com.byd.dms.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.byd.dms.serialize.MapToListSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

//需要导入lombok
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    
    
    private String id;
    
    private String name;
    private int age;
    private String sex;
    
    public User(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }
    
    private Dept dept;
    
    private List<String> hobbies;
    
    //@JSONField( serialize=false)
    //@JSONField(serializeUsing = MapToListSerializer.class)
    private Map<Integer, Dept> map = new HashMap<>();
    
    
}